package org.example.controller;


import lombok.AllArgsConstructor;
import org.example.domain.po.SonTicket;
import org.example.domain.vo.SonTicketVO;
import org.example.service.ISonTicketService;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.HashSet;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yu
 * @since 2024-07-14
 */
@RestController
@AllArgsConstructor
@CrossOrigin(origins = {"*","null"})
@RequestMapping("/son-ticket")
public class SonTicketController {
private ISonTicketService sonTicketService;
    @GetMapping("/list/{beginAddress}/{endAddress}/{date}")
    public List<SonTicketVO> selectList(@PathVariable("beginAddress") String beginAddress, @PathVariable("endAddress") String endAddress, @PathVariable("date") String date) {
        // 方法体
        return sonTicketService.selectList(beginAddress,endAddress,date);
    }

    @GetMapping("/list")
    public HashMap<Integer, List<SonTicket>> List() {
        // 方法体
        return sonTicketService.getList();
    }

}
